package fhp.hlhj.giantfold.presenter

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.IShakeRed
import fhp.hlhj.giantfold.javaBean.ShakeRedBean
import fhp.hlhj.giantfold.javaBean.ShakeRedListBean
import fhp.hlhj.giantfold.module.ShakeRedModule

/**
 * Created by Administrator on 2018\2\5 0005.
 */
class ShakeRedPresenter(private val iShakeRed: IShakeRed) : ShakeRedModule.onShakeListener {
    private val module=ShakeRedModule()
    fun shakeRed(params: HttpParams){
        module.shakeRed(params,this)
    }

    fun setRecycler(){
        iShakeRed.setRecycler()
    }
    fun shakeRedList(params: HttpParams){
        module.shakeRedList(params,this)
    }
    override fun showLoading() {
        iShakeRed.showLoading()
    }

    override fun onResp(shakeRedBean: ShakeRedBean) {
        iShakeRed.onResp(shakeRedBean)
    }

    override fun onListResp(shakeRedListBean: ShakeRedListBean) {
        iShakeRed.onListResp(shakeRedListBean)
    }
}